package cn.tedu.sp02.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import cn.tedu.pojo.Item;
import cn.tedu.service.ItemService;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@Service
public class ItemServiceImpl implements ItemService {
	@Override
	public List<Item> getItems(String orderId) {
		//模拟数据库返回的信息
		ArrayList<Item> arrayList = new ArrayList<>();
		arrayList.add(new Item(1,"商品1", 10));
		arrayList.add(new Item(2,"商品2", 100));
		arrayList.add(new Item(3,"商品3", 50));
		arrayList.add(new Item(4,"商品4", 60));
		arrayList.add(new Item(5,"商品5", 30));
		return arrayList;
	}
	@Override
	public void decreaseNumbers(List<Item> items) {
		log.info("减少商品库存");
	}

}
